package cn.edu.sdju.fengguoyu;

import cn.edu.sdju.fengguoyu.proto.Service;

public class RegisterServerInfo implements Comparable<RegisterServerInfo> {
    private long timestamp;

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

    private int id;

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    private int rank;

    public void setRank(int rank) {
        this.rank = rank;
    }

    public int getRank() {
        return rank;
    }

    private String serverName;
    private Service service;

    public Service getService() {
        return service;
    }

    public void setService(Service service) {
        this.service = service;
    }

    public void setServerName(String serverName) {
        this.serverName = serverName;
    }

    @Override
    public int compareTo(RegisterServerInfo info) {
        return this.rank - info.rank;
    }
}
